home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: insert Extrusion~inserts the Extrusion node. The Extrusion node specifies geometric
- shapes based on a two dimensional cross-section extruded along a three dimensional
- spine in the local coordinate system.
- @EndTool:
- @Summary: insert Extrusion~inserts the Extrusion node
- */
-
- var Node =
- "Extrusion {" +
- "\n\t # set_crossSection eventIn MFVec2f" +
- "\n\t # set_orientation eventIn MFRotation" +
- "\n\t # set_scale eventIn MFVec2f" +
- "\n\t # set_spine eventIn MFVec3f" +
- "\n\tbeginCap TRUE # field SFBool" +
- "\n\tccw TRUE # field SFBool" +
- "\n\tconvex TRUE # field SFBool" +
- "\n\tcreaseAngle 0 # field SFFloat" +
- "\n\tcrossSection # field MFVec2f" +
- "\n\t[" +
- "\n\t\t1 1, 1 -1, -1 -1, -1 1, 1 1" +
- "\n\t]" +
- "\n\tendCap TRUE # field SFBool" +
- "\n\torientation # field MFRotation" +
- "\n\t[" +
- "\n\t\t0 0 1 0" +
- "\n\t]" +
- "\n\tscale # field MFVec2f" +
- "\n\t[" +
- "\n\t\t1 1" +
- "\n\t]" +
- "\n\tsolid TRUE # field SFBool" +
- "\n\tspine # field MFVec3f" +
- "\n\t[" +
- "\n\t\t0 0 0, 0 1 0" +
- "\n\t]" +
- "\n}" +
- "\n@Caret";
-
- function DoCommand()
- {
- var textUtilities = getScriptObject("Library\\textUtilities.script");
- if (textUtilities)
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var lineIndex = textUtilities.InsertString(editor, Node);
-
- // Now replace @Caret with the real caret
- var range = editor.findFirst("@Caret", lineIndex, 0);
- editor.replace("", range);
- editor.setActive("Insert Extrusion Node");
- }
- }
- }
-
- !!/Script
-
-